package com.ruoyi.pyo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pyo.mapper.PetYeahReceiverAddrMapper;
import com.ruoyi.pyo.domain.PetYeahReceiverAddr;
import com.ruoyi.pyo.service.IPetYeahReceiverAddrService;

/**
 * 收件地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-19
 */
@Service
public class PetYeahReceiverAddrServiceImpl implements IPetYeahReceiverAddrService 
{
    @Autowired
    private PetYeahReceiverAddrMapper petYeahReceiverAddrMapper;

    /**
     * 查询收件地址
     * 
     * @param id 收件地址主键
     * @return 收件地址
     */
    @Override
    public PetYeahReceiverAddr selectPetYeahReceiverAddrById(String id)
    {
        return petYeahReceiverAddrMapper.selectPetYeahReceiverAddrById(id);
    }

    /**
     * 查询收件地址列表
     * 
     * @param petYeahReceiverAddr 收件地址
     * @return 收件地址
     */
    @Override
    public List<PetYeahReceiverAddr> selectPetYeahReceiverAddrList(PetYeahReceiverAddr petYeahReceiverAddr)
    {
        return petYeahReceiverAddrMapper.selectPetYeahReceiverAddrList(petYeahReceiverAddr);
    }

    /**
     * 新增收件地址
     * 
     * @param petYeahReceiverAddr 收件地址
     * @return 结果
     */
    @Override
    public int insertPetYeahReceiverAddr(PetYeahReceiverAddr petYeahReceiverAddr)
    {
        petYeahReceiverAddr.setCreateTime(DateUtils.getNowDate());
        return petYeahReceiverAddrMapper.insertPetYeahReceiverAddr(petYeahReceiverAddr);
    }

    /**
     * 修改收件地址
     * 
     * @param petYeahReceiverAddr 收件地址
     * @return 结果
     */
    @Override
    public int updatePetYeahReceiverAddr(PetYeahReceiverAddr petYeahReceiverAddr)
    {
        petYeahReceiverAddr.setUpdateTime(DateUtils.getNowDate());
        return petYeahReceiverAddrMapper.updatePetYeahReceiverAddr(petYeahReceiverAddr);
    }

    /**
     * 批量删除收件地址
     * 
     * @param ids 需要删除的收件地址主键
     * @return 结果
     */
    @Override
    public int deletePetYeahReceiverAddrByIds(String[] ids)
    {
        return petYeahReceiverAddrMapper.deletePetYeahReceiverAddrByIds(ids);
    }

    /**
     * 删除收件地址信息
     * 
     * @param id 收件地址主键
     * @return 结果
     */
    @Override
    public int deletePetYeahReceiverAddrById(String id)
    {
        return petYeahReceiverAddrMapper.deletePetYeahReceiverAddrById(id);
    }
}
